<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>

  <script>
    /* 
        break和continue
            - break
                - break用来终止switch和循环语句
                - break执行后，当前的switch或循环会立即停止
                - break会终止离它最近的循环
            - continue
                - continue 用来跳过本次循环
    */
    // for (var i = 0; i < 5; i++) {
    //   if (i === 3) {
    //     break;
    //   }
    //   console.log(i, "i");
    // }
    for (var i = 0; i < 5; i++) {
      console.log(i, "i");
      for (var j = 0; j < 5; j++) {
        if (j == 3) {
          console.log(j, "j");
          break;
        }
      }
    }
  </script>
</html>
